/* stylelint-disable no-descending-specificity */

.base {
  display: flex;
  flex-direction: column;
  max-height: 100%;

  &:not(:last-child) {
    padding-bottom: var(--theme-sizes-layout-big);
  }
  .header {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    justify-content: space-between;
  }
  .title {
    align-items: center;
    display: flex;
    flex-grow: 1;
    height: var(--theme-sizes-layout-giant);
    line-height: var(--theme-sizes-layout-giant);
    margin-bottom: var(--theme-sizes-layout-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .options {
    display: flex;
    margin-bottom: var(--theme-sizes-layout-medium);
    margin-left: auto;
  }
  .title + .options {
    margin-left: var(--theme-sizes-layout-medium);
  }
  .body {
    border-color: var(--theme-colors-monochrome-13);
    border-style: solid;
    border-width: 0;
    flex-grow: 1;
    height: max-content;
    min-height: 0;
    position: relative;
  }
  .filterBar {
    background-color: var(--theme-colors-monochrome-15);
    border: solid var(--theme-sizes-border-width) var(--theme-colors-monochrome-12);
    border-radius: var(--theme-sizes-border-radius);
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: var(--theme-sizes-layout-tiny);
    width: 100%;

    & > * { margin: var(--theme-sizes-layout-tiny); }
  }
}
.base.maxHeight {
  height: 100%;
}
.base.divider .body {
  border-top-width: var(--theme-sizes-border-width);
  padding-top: var(--theme-sizes-layout-medium);
}
.base.bodyBorder {
  .body {
    background-color: var(--theme-colors-monochrome-17);
    border: solid var(--theme-sizes-border-width) var(--theme-colors-monochrome-12);
    border-radius: var(--theme-sizes-border-radius);
    padding: var(--theme-sizes-layout-big);
  }
  .filterBar {
    border-radius: var(--theme-sizes-border-radius) var(--theme-sizes-border-radius) 0 0;
    border-width: var(--theme-sizes-border-width) var(--theme-sizes-border-width) 0 var(--theme-sizes-border-width);
  }
  .filterBar + .body {
    border-radius: 0 0 var(--theme-sizes-border-radius) var(--theme-sizes-border-radius);
  }
}
.base.bodyDynamic {
  .body > :global(.ant-spin-nested-loading) {
    height: 100%;
    position: absolute;
    width: 100%;
  }
}
.base.bodyNoPadding {
  .body { padding: 0; }
}
.base.bodyScroll {
  height: 100%;

  .body {
    height: 100%;
    overflow: auto;
  }

  @media only screen and (max-width: $breakpoint-mobile) {
    height: auto;

    .body {
      height: inherit;
      overflow: inherit;
    }
  }
}
